package com.quanyan.orderpay.vo.request;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by Zheng.Ke
 * Date 2017/3/6.
 */
public class ChinaumsPayNotifyReqVo {
    /** 合作伙伴代码 */
    @Pattern(regexp = "CHINAUMS", message = "无此合作伙伴")
    @NotBlank
    private String partnerCode;
    /** 百灵鸟订单号 */
    @NotBlank(message = "百灵鸟订单号不能为空")
    private String orderNo;
    /** 支付完成时间 */
    @Pattern(regexp = "\\d{14}", message = "格式不正确。格式为yyyyMMddHHmmss，如2009年12月25日9点10分10秒表示为20091225091010。")
    @NotBlank(message = "格式为yyyyMMddHHmmss，如2009年12月25日9点10分10秒表示为20091225091010。")
    private String timeEnd;
    /** 支付结果 */
    @NotBlank(message = "支付结果不能为空")
    private String resultCode;
    /** 银联商户平台流水号 */
    @NotBlank(message = "银联商户平台流水号不能为空")
    private String transactionId;
    /** 交易参考号 */
    @NotBlank(message = "交易参考号不能为空")
    private String referenceNo;
    /** 终端编码 */
    @NotBlank(message = "终端编码不能为空")
    private String terminalId;
    /** 商户编号 */
    @NotBlank(message = "商户编号不能为空")
    private String merchantId;
    /** 支付金额, 单位：分 */
    @NotNull(message = "支付金额不能为空，最少为1分")
    @Min(1)
    private Integer cashFee;
    /** 随机字符串 */
    @Length(min = 32, max = 32, message = "随机字符串必须是32位")
    @NotBlank
    private String nonceStr;
    /** 签名 */
    @NotBlank
    private String sign;

    //收款账号
    private String sellerId;

    public String getSellerId() {
        return sellerId;
    }

    public void setSellerId(String sellerId) {
        this.sellerId = sellerId;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getPartnerCode() {
        return partnerCode;
    }

    public void setPartnerCode(String partnerCode) {
        this.partnerCode = partnerCode;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getTimeEnd() {
        return timeEnd;
    }

    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getReferenceNo() {
        return referenceNo;
    }

    public void setReferenceNo(String referenceNo) {
        this.referenceNo = referenceNo;
    }

    public String getTerminalId() {
        return terminalId;
    }

    public void setTerminalId(String terminalId) {
        this.terminalId = terminalId;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public Integer getCashFee() {
        return cashFee;
    }

    public void setCashFee(Integer cashFee) {
        this.cashFee = cashFee;
    }

    public String getNonceStr() {
        return nonceStr;
    }

    public void setNonceStr(String nonceStr) {
        this.nonceStr = nonceStr;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }
}
